package com.atguigu.gmall.order.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.order.client.impl.OrderDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * ClassName: OrderFeifnClient
 * Package: com.atguigu.gmall.order.client
 * Description:
 *
 * @Author 刘轩
 * @Create 2023-09-02 10:16
 * @Version 1.0
 */

@FeignClient(value = "service-order", fallback = OrderDegradeFeignClient.class)
public interface OrderFeifnClient {

    /**
     * 订单确认页面数据模型汇总
     * @return
     */
    @GetMapping("/api/order/auth/trade")
    Result authTrade();


    /**
     * 获取订单
     * @param orderId
     * @return
     */
    @GetMapping("/api/order/inner/getOrderInfo/{orderId}")
    OrderInfo getOrderInfo(@PathVariable Long orderId);
}

